<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title></title>
</head>
<body>
    <pager th:fragment="page(page)">
        <div class="dt-panelfooter clearfix" th:object="${page}">
            <div class="dataTables_info" th:text="|第 *{pageNum}/*{pages} 页 总计 *{total} 条 每页|"></div>
            <div class="dataTables_info">
                <select id="pageSize" th:value="*{pageSize}" onchange="window.location=$(this).val().replace(/&amp;*(pageSize=|pageNum=){1}[0-9]*/,'')+($(this).val().replace(/&amp;*(pageSize=|pageNum=){1}[0-9]*/,'').indexOf('?')==-1 ? '?&amp;pageNum=1&amp;pageSize='+$(this).find('option:selected').text() : '&amp;pageNum=1&amp;pageSize='+$(this).find('option:selected').text());">
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==5}">5</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==10}">10</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==12}">12</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==20}">20</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==30}">30</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==50}">50</option>
                    <option th:value="@{*{requestUrl}}" th:selected="*{pageSize==100}">100</option>
                </select>
            </div>
            <div class="dataTables_info" th:text="|条|"></div>
                <div class="dataTables_paginate">
                <ul class="pagination">
                    <li class="paginate_button previous" th:classappend="*{isFirstPage} ? 'disabled'">
                        <a href="#" th:onclick="'return ' + *{!isFirstPage}" th:href="@{*{requestUrl}(pageNum=1)}">首页</a>
                    </li>
                    <li class="paginate_button previous" th:classappend="*{!hasPreviousPage} ? 'disabled'">
                        <a href="#" th:onclick="'return ' + *{hasPreviousPage}" th:href="@{*{requestUrl}(pageNum=*{prePage})}">上一页</a>
                    </li>
                    <th:block th:each="num:*{navigatepageNums}">
                        <li class="paginate_button" th:classappend="${num == page.pageNum} ? 'active'">
                            <a href="#" th:href="@{*{requestUrl}(pageNum=${num})}" th:text="${num}"></a>
                        </li>
                    </th:block>
                    <li class="paginate_button next" th:classappend="*{!hasNextPage} ? 'disabled'">
                        <a href="#" th:onclick="'return ' + *{hasNextPage}" th:href="@{*{requestUrl}(pageNum=*{nextPage})}">下一页</a>
                    </li>
                    <li class="paginate_button last" th:classappend="*{isLastPage} ? 'disabled'">
                        <a href="#" th:onclick="'return ' + *{!isLastPage}" th:href="@{*{requestUrl}(pageNum=*{pages})}">尾页</a>
                    </li>
                </ul>
            </div>
        </div>
    </pager>
</body>
</html>